#include "MyUtils.h"
#include "MyLog.h"

#include <stdio.h>
#include <string.h>


#include "MyTime.h"

void TEST_TIME(int argc){
    MY_LOGE("%d %lld",argc, getCurrentTimeSec());
    MY_LOGE("%d %lld",argc, getCurrentTimeNsec());
}

#include <stdlib.h>
void TEST_MEMORY(){
    char *str = NULL;
    MY_LOGE("%#x", str);
    str = (char *)malloc(sizeof(128));
    MY_LOGE("%#x", str);
}



#include "FileManager.h"
int TEST_FILEINFO(){

    FileInfo *file = FileInfo_open("E:\\work\\BB.txt");
    if(file == 0){
        return 0;
    }
    MY_LOGE("%s. (Size = %d byte)", file->path, file->size);
    // file->remove(file);
    char cc[256];
    memset(cc, 1, sizeof(cc));
    file->readLine(file, cc ,sizeof(cc));

    FileInfo_destory(file);
    return 0;
}

int TEST_RANDOMNUM(){
    int res = getRandomInt(1,10);
    MY_LOGD("random = %d", res);
}


int main(int argc, char *args[]){
    while(1){

        TEST_RANDOMNUM();

    }

    return 0;
}

